<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script src="../common/jquery/js/jquery-1.9.1.js"></script>
<script src="./ibmigration.js"></script>

<style>
html,body{width:100%;height:100%;margin:0px;padding:0px}
div{position:relative}
textarea{margin:0px;padding:0px;width:100%;height:100%;}
#main{width:100%;height:100%;padding:0px}
#left{width:98%;height:47%;background-color:#AADDFF;}
#btn{width:98%;text-align:center;margin-top:10px;margin-bottom:10px;}
#right{width:98%;height:47%;}
</style>
<title>ibsheet3 Migration Page</title>
<!--  js beautify -->
 <script src="./js-beautify/web/third-party/codemirror/lib/codemirror.js"></script>
 <script src="./js-beautifyweb/third-party/codemirror/mode/javascript/javascript.js"></script>
 <script src="./js-beautify/js/lib/beautify.js"></script>
 <script src="./js-beautify/js/lib/beautify-css.js"></script>
 <script src="./js-beautify/js/lib/beautify-html.js"></script>
 <script src="./js-beautify/js/test/sanitytest.js"></script>
 <script src="./js-beautify/js/test/beautify-tests.js"></script>
 <script src="./js-beautify/js/lib/unpackers/javascriptobfuscator_unpacker.js"></script>
 <script src="./js-beautify/js/lib/unpackers/urlencode_unpacker.js"></script>
 <script src="./js-beautify/js/lib/unpackers/p_a_c_k_e_r_unpacker.js"></script>
 <script src="./js-beautify/js/lib/unpackers/myobfuscate_unpacker.js"></script>



<script>
	$(document).ready(function(){
		
		$("#convert1").bind("click",function(){
			convertWork("MSheet",document.all.leftT.value,document.all.rightT);
		});
		sheet.CellValue(1,5);
	})
</script>
</head>
<body>
<div id="main">
	<div id="left">
		<textarea id="leftT">
		initIBSheet(MSheet);
	    with (MSheet) {
	
	        // 전체 너비 설정
	        SheetWidth = 770;
	
	        // Host정보 설정[필수][HostIp, Port, PagePath]
	        //==============================PagePath를 "/"로 주는것이 중요=========================
	        InitHostInfo(location.hostname, location.port, "/");
	        
	        HeadRowHeight = "30";
	
	        var viewSheetRows = getRowCount(SheetWidth, HeadRowHeight, DataRowHeight);  
	
	        // 행정보설정[필수][HEADROWS,DATAROWS,VIEWROWS,ONEPAGEROWS=100]
	        InitRowInfo( 1, 1, 17);
	
	        // 해더행정보[필수][ROW,HEADTEXT,ROWMERGE=false, HIDDEN=false]
	        var headerText  = "비목|비목명|비목약명|비목\n형태|통제대상\n여부|B/S,P/L\n구분|OP비목\n여부|자동배정\n구분|초과계리\n가능여부|예산불성립시\n집행가능여부|국외사무소\n입력가능여부|반기배정\n여부|집행성격별\n비목기능|상위비목|상위비목명|회계계정\n과목|회계계정|집행가능\n여부|사용\n여부|적용일자|폐지일자";
	                                  //"비목     |비목명   |비목약명   |비목형태     |통제대상여부|B/S, P/L|OP비목여부  |자동배정구분   |초과계리가능   |예산불성립시집행여부|국외사무소입력    |반기배정여부  |집행성격별기능   |상위비목       | 상위비목명    |회계계정과목  |회계계정       |집행가능 |사용\n여부|적용일자  |폐지일자";
		    var headerValue = new Array("BMK_CD", "BMK_NM", "BMK_SNM", "BMK_TYPE_NM", "CTRL_NM", "BS_PL_NM", "OP_BMK_NM", "AUTO_DIV_NM", "OVER_ACCT_NM", "BUGT_PFM_BMK_NM", "FRG_OFFICE_USE_NM", "HALF_DIV_NM", "PFM_BMK_FUN_NM", "UPPER_BMK_CD", "UPPER_BMK_NM", "ACCT_GEJNG", "ACCT_GEJNG_NM", "PFM_NM", "USE_NM", "ENF_YMD", "STOP_YMD");
		    var celWidth    = new Array(60      , 150     , 120      ,  50          , 90       , 60        , 60         , 60           , 60            , 80               , 80                 , 60           , 150              , 60            , 120           , 50          , 120            , 50      , 40      , 70       , 70        );
		    var celAlign    = new Array(daCenter, daLeft  , daLeft   , daCenter     , daCenter , daCenter  , daCenter   , daCenter     , daCenter      , daCenter         , daCenter           , daCenter     , daLeft           , daCenter      , daLeft       , daCenter     , daLeft         , daCenter, daCenter, daCenter , daCenter  );
	         
	        // 컬럼정보설정[필수][COLS,FROZENCOL,LEFTHEADCOLS=0,FROZENMOVE=false]
	        InitColumnInfo(headerValue.length, 0, 0, true);
	
	        // 헤더정보설정[sort, colmove, 전체선택, 컬럼리사이즈, rowmove, 헤더3d]
	        InitHeadMode(true, false, false, true, false, true);
	        InitHeadRow(0, headerText, true);
	        for (var i= 0; i<headerValue.length; i++) {
	            InitDataProperty (0, i, dtData , celWidth[i],   celAlign[i] , true , headerValue[i] ) ;
	        }
	
			ActionMenu = "자료다운로드";
	
			FrozenCols = 3;
			ExtendLastCol = true;
	        Visible = true;
	
	        MessageText("ConfirmTitle") = "<%= pgmName %>";
	
	    }
		</textarea>
	</div>
	<div id="btn">
		<button id="convert1">javascript arrange!!!</button>
	</div>
	<div id="right">
		<textarea id="rightT" style="width:100%;height:100%"></textarea>
	</div>

</div>
</body>
</html>